package com.wl.designpattern.decorator;

/**
 * 抽象装饰角色
 * Created by wangliang on 2021/2/27.
 */
public class RoomDecorator extends Room { //继承Room，拥有父类相同的方法

    private Room mRoom;//持有被装饰者的引用，这里是需要装修的房间

    public RoomDecorator(Room room) {
        this.mRoom = room;
    }

    @Override
    public void fitment() {
        mRoom.fitment();//调用被装饰者的方法
    }
}
